\newcommand{\GlobalVarsSectionName}{Global variables}
\subsection{\GlobalVarsSectionName}
\myindex{\GlobalVarsSectionName}
\label{scanf_global_variable}

What if the \TT{x} variable from the previous example isn't local but a global one? 
Then it would have been accessible from any point, not only from the function body. 
Global variables are considered \gls{anti-pattern}, but for the sake of the experiment, we could do this.

\lstinputlisting[style=customc]{patterns/04_scanf/2_global/ex2_EN.c}

\input{patterns/04_scanf/2_global/ex2_global_vars_x86_EN}
\input{patterns/04_scanf/2_global/ex2_global_vars_ARM_EN}

\input{patterns/04_scanf/2_global/MIPS/main}

